/**
 * Created by wdj on 16/9/6.
 * getter
 */

export const filteredNotes = (state) => {
    if (state.show === 'all') {
        return state.notes || []
    } else {
        return state.notes.filter(note => note.favorite) || []
    }
}

export const show = (state) => {
    return state.show
}

export const activeNote = (state) => {
    return state.activeNote
}

export const ready = (state) => state.ready
